<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <div th:fragment="staticTemplateQuestionList">
        <th:block th:if="${message!=null}" >
            <input type="hidden" id="static_template_import_result" th:value="${message}"/>
        </th:block>
        <div th:each="currentQuestion:${currentQuestions}">
            <th:block th:if="${currentQuestion.type=='单选题' || currentQuestion.type=='多选题'}">
                <div class="static_template_left_content">
                    <div class="static_template_content_edit_group">
                        <a href = "javascript:void(0)" onclick="template.static.questionEdit(this)">编辑</a><a href="javascript:void(0)" th:onclick="template.static.question_delete(this)">删除</a>
                    </div>
                    <div class="static_template_left_content_head">
                        <input th:value="${currentQuestion.number}" type="checkbox"/><span>[[${currentQuestion.number}]].[[${currentQuestion.type}]]</span>
                    </div>
                    <div class="static_template_left_content_question" >
                        <div style="margin-top:5px" th:text="${currentQuestion.subject}"></div>
                        <div style="margin-top:5px" th:each="option:${currentQuestion.options}">
                            <button  th:styleappend="${currentQuestion.answerCodes[optionStat.index] == optionStat.index?';background: #2aabd2':''}" style="border: 1px solid deepskyblue" th:classappend="${currentQuestion.answerCodes[optionStat.index] == optionStat.index?'avtive':''}"  class="btn btn-default btn-lg" th:text="${currentQuestion.optionNumber[optionStat.index]}"></button><span style="margin-left: 10px" th:text="${option}"></span>
                        </div>
                    </div>
                </div>
                <hr/>
            </th:block>
            <th:block th:if="${currentQuestion.type=='判断题'}">
                <div class="static_template_left_content">
                    <div class="static_template_content_edit_group">
                        <a onclick="template.static.questionEdit(this)">编辑</a><a href="javascript:void(0)" th:onclick="template.static.question_delete(this)">删除</a>
                    </div>
                    <div class="static_template_left_content_head">
                        <input th:value="${currentQuestion.number}" type="checkbox"/><span>[[${currentQuestion.number}]].[[${currentQuestion.type}]]</span>
                    </div>
                    <div class="static_template_left_content_question">
                        <input type="hidden" th:value="${currentQuestion.answers[0]}"/>
                        <div style="margin-top:5px">[[${currentQuestion.subject}]]</div>
                        <div class="answer1" style="margin-top:5px"><button th:styleappend="${currentQuestion.answers[0]=='正确'?';background: #2aabd2':''}" style="border: 1px solid deepskyblue" th:classappend="${currentQuestion.answers[0]=='正确'?'active':''}" class="btn btn-default">[[${currentQuestion.options[0]}]]</button></div>
                        <div class="answer2" style="margin-top:5px"><button th:styleappend="${currentQuestion.answers[0]=='错误'?';background: #2aabd2':''}" style="border: 1px solid deepskyblue" th:classappend="${currentQuestion.answers[0]=='错误'?'active':''}" class="btn btn-default">[[${currentQuestion.options[1]}]]</button></div>
                    </div>
                </div>
                <hr/>
            </th:block>
            <th:block th:if="${currentQuestion.type=='填空题'}">
                <div class="static_template_left_content">
                    <div class="static_template_content_edit_group">
                        <a onclick="template.static.questionEdit(this)">编辑</a><a href="javascript:void(0)" th:onclick="template.static.question_delete(this)">删除</a>
                    </div>
                    <div class="static_template_left_content_head">
                        <input th:value="${currentQuestion.number}" type="checkbox"/><span>[[${currentQuestion.number}]].[[${currentQuestion.type}]]</span>
                    </div>
                    <div class="static_template_left_content_question">
                        <div style="margin-top:5px">[[${currentQuestion.subject}]]</div>
                        <div style="margin-top:5px" th:each="answer:${currentQuestion.answers}">
                            <button style="border: 1px solid deepskyblue;background: #2aabd2" class="btn btn-default btn-lg">填空[[${answerStat.index}+1]]</button><span style="margin-left: 10px" th:text="${answer}"></span>
                        </div>
                    </div>
                </div>
                <hr/>
            </th:block>
            <th:block th:if="${currentQuestion.type=='综合题'}">
                <div class="static_template_left_content">
                    <div class="static_template_content_edit_group">
                        <a onclick="template.static.questionEdit(this)">编辑</a><a href="javascript:void(0)" th:onclick="template.static.question_delete(this)">删除</a>
                    </div>
                    <div class="static_template_left_content_head">
                        <input th:value="${currentQuestion.number}" type="checkbox"/><span>[[${currentQuestion.number}]].[[${currentQuestion.type}]]</span>
                    </div>
                    <div class="static_template_left_content_question">
                        <div style="margin-top:5px">[[${currentQuestion.subject}]]</div>
                        <div style="margin-top:5px">
                            <button style="border: 1px solid deepskyblue;background: #2aabd2" class="btn btn-default btn-lg">答案解析</button><span style="margin-left: 10px" th:text="${currentQuestion.answers[0]}"></span>
                        </div>
                    </div>
                </div>
                <hr/>
            </th:block>
        </div>
    </div>
</html>